<template>
    <li @click="liClick"><a href="javascript:;"><slot></slot></a></li>
</template>

<script>
export default {
    name:'Li-item',
    props:{
      path:{
        type:String
      }
    },
    methods:{
      liClick(){
        if (this.$route.path != this.path) {
          this.$router.replace(this.path)
        }
        
      }
      
    }
}
</script>

<style scoped>
li {
  line-height: 50px;
}
li a {
  padding-left: 60px;
  color: #aeb7c2;
}
</style>